﻿using Newtonsoft.Json;
using Restaurant.Common;
using Restaurant.Site;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using System.Web.Http;
using System.Web.Http.Description;

namespace Restaurant.API.Client.Controllers
{
    public class SignInController : ApiController
    {

        /// <summary>
        /// 查询
        /// </summary>
        /// <param name="subComanyId"></param>
        /// <returns></returns>
        [ResponseType(typeof(OperationResult))]
        [HttpGet]
        public async Task<HttpResponseMessage> SignIn(Guid subId, string uid ,string pwd )
        {
            SignInSite tableSite = new SignInSite();

            var fModel = await tableSite.SignIn (subId, uid ,pwd  );
            HttpResponseMessage httpResponseMessage = new HttpResponseMessage()
            {
                StatusCode = HttpStatusCode.OK,
                Content = new StringContent(JsonConvert.SerializeObject(fModel), System.Text.Encoding.UTF8, "application/json"),

            };
 
            return httpResponseMessage;

        }
    }
}
